#!/bin/bash -e

# Build the base project so we can pull out the JSON data
npm run dist
cp -rf dist docs

# Now build the docs site using that data
cd docs

if [ -n "$1" ]; then
  CI=true npm run build:storybook preview
else
  CI=true npm run build:storybook
fi
